package com.bdcom.autotest.interaction.http.callback;

import com.bdcom.autotest.interaction.bean.DeviceUpdBean;
import com.bdcom.autotest.interaction.http.IEnterMonitorCallback;
import com.bdcom.autotest.interaction.step.StepThread;

import java.util.List;

public class EnterMonitorCallBack implements IEnterMonitorCallback {

    private StepThread mainrun;
    public EnterMonitorCallBack(StepThread mainrun){
        this.mainrun = mainrun;
    }
    @Override
    public void enterMonitorCall( DeviceUpdBean bean  ){
       List<DeviceUpdBean> deviceUpdBeanList = mainrun.getEnterMonitorResult();
       if(bean.getMonitorFlag()){
           mainrun.addLog(bean.getMac() + "进入monitor.");
       }else{
           mainrun.addLog(bean.getMac() + "进入monitor失败，原因:" + bean.getMonitorStr());
       }
       deviceUpdBeanList.add(bean);
    }
}
